package com.gaohe;

import com.gaohe.service.UsersService;
import com.gaohe.pojo.User2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@ResponseBody
@org.springframework.stereotype.Controller
@RequestMapping("/user")
public class UsersController {
    @Autowired
    private UsersService usersService;
    @GetMapping("/login")
    public User2 login(User2 user){
        User2 res = usersService.login(user);
        return res;
    }
}
